import time
import pyautogui

#m = PyMouse()

##  每隔两秒 输出一次鼠标坐标
def getPosition():
    while(1):
        x, y = pyautogui.position()
        time.sleep(2)
        print(x,y)

getPosition()
